
import java.util.Arrays;
class Student {
   public String name;
   public String sex;
   public int age;
   public double credit;

    public void goToClass(){
        System.out.println(name+"去上课");
    }

    public void doHomework(){
        System.out.println("写作业");
    }

    public void needTest(){
        System.out.println("要考试");
    }
}
public class Text {
//    public static void main(String[] args) {
//        int[] array={4,1,2,1,2};
//        int ret=0;
//        for (int i = 0; i < array.length; i++) {
//            ret=ret^array[i];
//        }
//        System.out.println(ret);
//    }

//    public static void main(String[] args) {
//        int[] array=new int[] {1,2,2,2,1,2};
//        Arrays.sort(array);
//        System.out.println(array[array.length/2]);
//    }

//    public static void main(String[] args) {
//        int[] array = {3, 2, 15, 7, 9, 4, 3, 8};
//        int count = 0;
//        for (int i = 0; i < array.length; i++) {
//            if (array[i] % 2 != 0) {
//                count++;
//                if (count == 3) {
//                    System.out.println(true);
//                }
//            } else {
//                count = 0;
//            }
//        }
//    }

    public static void main(String[] args) {
        Student student=new Student();
        student.name="小黑";
        student.sex="男";
        student.age=1;
        student.goToClass();
        System.out.println(student.name);
        System.out.println("=============");
        Student student1=new Student();
        student1.name="小红";
        student1.sex="女";
        student1.age=6;
        student1.goToClass();
        System.out.println(student1.name);
    }
}
